For a programmable controller serving also as a data relay unit in a FA network, it is necessary to ensure a satisfactory data relay function at all times by executing a peripheral service process while executing the normal jobs such as a user program process between an upper-level computer and other programmable controllers. If the data transfer is not executed in a smooth manner, the upper-level computer may fail to execute application processes in a proper manner.
The upper-level computer is programmed in such a manner that the process of executing an application can move ahead every time a certain amount of data is retrieved from the associated program controllers. Therefore, if the data fails to be retrieved in a timely fashion, the process of executing the application is prevented from progressing in a smooth manner, and this may seriously affect the overall data processing performance of the system.
However, in the conventional programmable controller, the peripheral service process is executed only after the execution of the user program process and the I/O refresh process is completed as shown in the flowchart of FIG. 12.
Referring to FIG. 12, step 1201 is an initial process including updating of various flags. Step 1202 is a determination process for detecting the execution mode of the user program. Step 1203 represents other processes that are executed when the execution mode is not in progress. Step 1204 is a user program process. Step 1205 is an I/O refresh process. Step 1206 is a process for determining an execution duration Tx for a single execution of a peripheral service process. Step 1207 is a process for setting up on a timer the execution duration Tx for a single execution of the peripheral service process determined in step 1206. Step 1208 is a single execution of the peripheral service process. Step 1209 is a process for determining the progress of the execution duration Tx allocated to a single execution of the peripheral service process. Step 1210 is a post process following the completion of the single execution of the peripheral service process. The process for determining the progress of the execution duration Tx (step 1209) consists of a process for detecting a timer interruption.
As described above, because the peripheral service process in the conventional programmable controller is executed by a prescribed amount in a piecemeal manner following the completion of the user program process and the I/O refresh process, if the time period required for the execution of the user program princess has prolonged typically due to changes in the input and output information or revision of the program, the interval of executing the peripheral service process prolongs by a corresponding amount, and the data transfer process (including special I/O related processes) may fail to be executed in a satisfactory manner.